package com.zj.cman.modules.user.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zj.cman.modules.user.dao.UserMapper;
import com.zj.cman.modules.user.entity.User;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService extends ServiceImpl<UserMapper, User> {


    public User getUserByUsername(String username) {
        return this.getOne(new QueryWrapper<User>().eq("username", username));
    }

    public List<User> getUsersByStatus(String status) {
        return this.list(new QueryWrapper<User>().eq("status", status));
    }

    // 更多业务逻辑方法可以根据需要添加
}
